#ifndef VIDEOANALYSISSYSTEM_VAS_ALGORITHM_H
#define VIDEOANALYSISSYSTEM_VAS_ALGORITHM_H

#include <json/json.h>
//#include <rocketmq/DefaultMQProducer.h>
#include "vas_exception.h"
#include "vas_do.h"
#include "vas_utils.h"
#include "vas_cache.h"

namespace vas {
    // task types
    const char HUMAN_DETECTION_TASK[] = "HUMAN-DETECTION";
    const char FIRE_DETECTION_TASK[] = "FIRE-DETECTION";
    // algorithm types and constrains
    const char FIRE_RECOGNITION_ALGO[] = "FireRecognition";
    const char HUMAN_DETECTION_ALGO[] = "HumanDetection";
    const char SEND_MSG[] = "SEND_MSG";
    const std::string FIRE_LABELS[2] = {"fire", "no_fire"};
    const char MSG_SEND_LAST_TS[] = "MsgSendLastTimestamp";

    AlgorithmData* BuildAlgorithmData(const cv::Mat &image, const Channel &channel, long timestamp);

    std::string ConvertAlgorithmResult(AlgorithmData *data, const std::set<std::string> &task_types);

    void RouteAlgorithm(AlgorithmData *data, std::map<std::string, bool> algo_mock);

    void SendMsg(AlgorithmData *data);

    void FireRecognitionInit(bool mock);

    void FireRecognitionProcess(AlgorithmData *data, bool mock);

    void HumanDetectionInit(bool mock);

    void HumanDetectionProcess(AlgorithmData *data, bool mock);

}
#endif //VIDEOANALYSISSYSTEM_VAS_ALGORITHM_H
